package com.akk.module.yb.model;

import com.akk.PayConstants;
import com.akk.module.yb.utils.Digest;

public class YbPayWithDrawRequest {

    private String mainCustomerNumber;
    private String customerNumber;
    private String externalNo;
    private String serialNo;
    private String transferStatus;
    private String requestTime;
    private String handleTime;
    private String transferWay;
    private String receiver;
    private String receiverBankCardNo;
    private String receiverBank;
    private String amount;
    private String fee;
    private String basicFee;
    private String exTargetFee;
    private String actualAmount;
    private String failReason;
    private String hmac;

    public String getMainCustomerNumber() {
        return mainCustomerNumber;
    }

    public void setMainCustomerNumber(String mainCustomerNumber) {
        this.mainCustomerNumber = mainCustomerNumber;
    }

    public String getCustomerNumber() {
        return customerNumber;
    }

    public void setCustomerNumber(String customerNumber) {
        this.customerNumber = customerNumber;
    }

    public String getExternalNo() {
        return externalNo;
    }

    public void setExternalNo(String externalNo) {
        this.externalNo = externalNo;
    }

    public String getSerialNo() {
        return serialNo;
    }

    public void setSerialNo(String serialNo) {
        this.serialNo = serialNo;
    }

    public String getTransferStatus() {
        return transferStatus;
    }

    public void setTransferStatus(String transferStatus) {
        this.transferStatus = transferStatus;
    }

    public String getRequestTime() {
        return requestTime;
    }

    public void setRequestTime(String requestTime) {
        this.requestTime = requestTime;
    }

    public String getHandleTime() {
        return handleTime;
    }

    public void setHandleTime(String handleTime) {
        this.handleTime = handleTime;
    }

    public String getTransferWay() {
        return transferWay;
    }

    public void setTransferWay(String transferWay) {
        this.transferWay = transferWay;
    }

    public String getReceiver() {
        return receiver;
    }

    public void setReceiver(String receiver) {
        this.receiver = receiver;
    }

    public String getReceiverBankCardNo() {
        return receiverBankCardNo;
    }

    public void setReceiverBankCardNo(String receiverBankCardNo) {
        this.receiverBankCardNo = receiverBankCardNo;
    }

    public String getReceiverBank() {
        return receiverBank;
    }

    public void setReceiverBank(String receiverBank) {
        this.receiverBank = receiverBank;
    }

    public String getAmount() {
        return amount;
    }

    public void setAmount(String amount) {
        this.amount = amount;
    }

    public String getFee() {
        return fee;
    }

    public void setFee(String fee) {
        this.fee = fee;
    }

    public String getBasicFee() {
        return basicFee;
    }

    public void setBasicFee(String basicFee) {
        this.basicFee = basicFee;
    }

    public String getExTargetFee() {
        return exTargetFee;
    }

    public void setExTargetFee(String exTargetFee) {
        this.exTargetFee = exTargetFee;
    }

    public String getActualAmount() {
        return actualAmount;
    }

    public void setActualAmount(String actualAmount) {
        this.actualAmount = actualAmount;
    }

    public String getFailReason() {
        return failReason;
    }

    public void setFailReason(String failReason) {
        this.failReason = failReason;
    }

    public String getHmac() {
        return hmac;
    }

    public void setHmac(String hmac) {
        this.hmac = hmac;
    }

    public static String signature(YbPayWithDrawRequest request){
        StringBuffer sb = new StringBuffer();
        sb.append(request.getMainCustomerNumber() == null?"":request.getMainCustomerNumber());
        sb.append(request.getCustomerNumber() == null?"":request.getCustomerNumber());
        sb.append(request.getExternalNo() == null? "":request.getExternalNo());
        sb.append(request.getSerialNo() == null?"":request.getSerialNo());
        sb.append(request.getTransferStatus() == null?"":request.getTransferStatus());
        sb.append(request.getRequestTime() == null?"":request.getRequestTime());
        sb.append(request.getHandleTime() == null?"":request.getHandleTime());
        sb.append(request.getTransferWay()== null?"":request.getTransferWay());
        sb.append(request.getReceiver() == null?"":request.getReceiver());
        sb.append(request.getReceiverBankCardNo()== null?"":request.getReceiverBankCardNo());
        sb.append(request.getReceiverBank() == null?"":request.getReceiverBank());
        sb.append(request.getAmount() == null?"":request.getAmount());
        sb.append(request.getFee() == null?"":request.getFee());
        sb.append(request.getBasicFee() == null?"":request.getBasicFee());
        sb.append(request.getExTargetFee() == null?"":request.getExTargetFee());
        return Digest.hmacSign(sb.toString(), PayConstants.YB_PARAMS_HMAC_KEY);
    }
}
